Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Heresy, I say! 🐍
This PR adds integration with Python, such that Dagger can be made to execute Python functions on Python arguments. This will pair with a new Python library called pydaggerjl, which provides a Pythonic interface to Dagger via JuliaCall. While only the basics (spawn, fetch, wait) are there now, we'll be adding more APIs to pydaggerjl for
DArray
s, Datadeps, and more.While this PR is not strictly necessary (as calling Python functions already actually works, thanks to PythonCall), this formalizes our Python support by creating a single
PythonProcessor
per process, which matches the semantics of Python running with GIL limitations (so we only run one Python function at a time, regardless of how many Julia threads we have).An expected question is: Why do this at all? Isn't Julia the answer to the two-language problem, so we shouldn't concern ourselves with other languages? Well, that could be fine if Python was a very niche language that few people use. Instead, Python dominates the landscape of software, together with other languages like C/C++ and R (expect to see PRs for those in the future!). Additionally, when giving presentations about Dagger to broad audiences, we inevitably have at least one question each time about how to use Dagger with language XYZ, and have never really had a good answer to this. Therefore, I feel that it's time we embrace the possibility of cross-language interop, and allow Dagger to gain adoption outside of the Julia ecosystem.
Example from Python: